package demo1;

public class Test {
   /* //Single num1 = new Single();要用接口调用
    Single num1 = Single.getInstance();
    Single num2 = Single.getInstance();*/
   public static void main(String[] args) {
       Single3 num1 = Single3.getInstance();
       Single3 num2 = Single3.getInstance();

       System.out.println(num1 == num2);
   }
   public static void main1(String[] args) {
       //Single num1 = new Single();要用接口调用
       Single num1 = Single.getInstance();
       Single num2 = Single.getInstance();
       System.out.println(num1 == num2);
   }





}
